/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package ca.ubc.icapture.genapha.beans;

import icapture.SQLMgr;
import icapture.beans.DB.DataRequestApproval;
import icapture.beans.DB.User;

/**
 *
 * @author btripp
 */
public class DataOwnerDecorator extends DataRequestApproval {
    public DataOwnerDecorator(DataRequestApproval dataRequestApproval){
        super(dataRequestApproval);
    }

    /**
     * @return the status
     */
    public String getStatus() {

        if(super.getDateApproved()==null){
            return "Waiting Approval";
        }else if(super.isApproved()==true){
            return "Aproved";
        }
        return "Denied";
    }

    /**
     * @return the dataOwner
     */
    public String getName() {
        User user = SQLMgr.getUser(super.getUserID());
        return user.getFirstName() + " " +  user.getLastName();
    }
    

}
